# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=texmaker
pkgver=6.0.0
pkgrel=0
pkgdesc="Free cross-platform LaTeX editor since 2003"
url="https://www.xm1math.net/texmaker/index.html"
# qt6-qtwebengine-dev not avail
arch="aarch64 x86_64"
options="!check" # no check/test avail
license="GPL-2.0-or-later"
depends="desktop-file-utils"
makedepends="
	cmake
	qt6-qt5compat-dev
	qt6-qtbase-dev
	qt6-qtdeclarative-dev
	qt6-qttools-dev
	qt6-qtwebengine-dev
	samurai
	"
source="https://www.xm1math.net/texmaker/$pkgname-$pkgver.tar.bz2
fix-for-pdfium.patch
musl-1.2.3.patch"

builddir="$srcdir/$pkgname-$pkgver"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_INSTALL_PREFIX=/usr
	cmake --build build
}

check() {
	make test
}

package() {
	#mkdir -p "$pkgdir/usr/share"
	#make INSTALL_PATH="$pkgdir" INSTALL_ROOT="$pkgdir" PREFIX="/usr" install
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
173194510ce888297b6f6dc4e30bd0e8c1aa448d6ac1ea27b4f356fe36992bb8f4712a3ad03956f0952da72edd87e09695ea0eeb63fff43ff678a5dfa4f4ad7d  texmaker-6.0.0.tar.bz2
5550cd7055fab737fd86af35d2a931a0dd28cfe55b9be9e3088315739776480ea9c152a4a80ff66b549a5c9b69e09bfe4d4f9ce1e5dad48d3bb301e4d5afa234  fix-for-pdfium.patch
34e47905866f932b760d15284d92341819160b99190ec4058d108828f18985dd8bd4ebae8d21823b6a30341b95893b60d75a2e454dd969ef07d684c4845bb1b7  musl-1.2.3.patch
"
